<?php
session_start();
header('Content-type: text/html; charset=utf-8');

include_once($_SERVER["DOCUMENT_ROOT"]."/public/function.php");
$config = include_once($_SERVER["DOCUMENT_ROOT"]."/public/config.php");
$_POST['ctime']=time();

$res = add($config,'pinlun');
//var_dump($res);die;

if($res){
    echo '<script>alert("添加成功！");window.location.href="yuedu.php?id='.$_SESSION['id'].'"</script>';
}else{
    echo $sql; die;
    echo '<script>alert("添加失败！");window.location.href="index.php"</script>';
    
}


?>